#include <gtk/gtk.h>

#include "xmlWidget.h"
using namespace xmlWidgetLib;

#include "logManager.h"

int main( int   argc, char *argv[] )
{
	logger<<"start "<<argv[0]<<endl;

	gtk_init (&argc, &argv);

	xmlWidget *mainWindow;
	try
	{
		mainWindow = new xmlWidget ( "MainWidget.xml" );
	}
	catch( string * msg )
	{
		logger << *msg << endl;
		delete msg;
		return -1;
	}
	logger<<"show widget tree "<<endl;
	mainWindow->dumpTree();
	logger<<"start show window"<<endl;
	mainWindow->show();

	gtk_main ();
	delete mainWindow;
	logger<<"end "<<argv[0]<<endl;
	return(0);
}
